home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Hallo5.cpp < prev    next >
C/C++ Source or Header  |  1999-01-24  |  1KB  |  38 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Hallo5.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TForm1::ComboBox1Change(TObject *Sender)
  16. {
  17.   switch (ComboBox1->ItemIndex)
  18.   {
  19.     case 0:
  20.       Application->MessageBox ("Das ist ja toll!", "", 4+48);
  21.       break;
  22.     case 1:
  23.       Application->MessageBox ("Das freut mich!", "", 4+48);
  24.       break;
  25.     case 2:
  26.       Application->MessageBox ("Das geht ja noch!", "", 4+32);
  27.       break;
  28.     case 3:
  29.       Application->MessageBox ("Das tut mir leid!", "", 4+48);
  30.       break;
  31.     case 4:
  32.       Application->MessageBox ("Das ist ja schlimm!", "", 4+48);
  33.       break;
  34.     case 5:
  35.       Application->MessageBox ("Wenn du meinst...", "", 1+16);
  36.   }
  37. }
  38. //---------------------------------------------------------------------------